﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure.StorageClient;
using Microsoft.WindowsAzure;

namespace Parser
{
    class DocinfoContext : TableServiceContext
    {
        public DocinfoContext(string baseAddress,
            StorageCredentials credentials)
            : base(baseAddress, credentials)
        { 
        }

        public void Add(int partitionKey, int docID, string url)
        {
            Docinfo docinfo = new Docinfo();
            docinfo.PartitionKey = partitionKey.ToString();
            docinfo.RowKey = docID.ToString();
            docinfo.url = url;

            this.AddObject("docinfo", docinfo);
        }
    }
}
